package com.android.benbourahla.carmode.utils;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.telephony.SmsManager;
import android.widget.Toast;

public class Utils
{
	public static String sharedName = "CarMode";
	public static void DisplayAlertDialog(Context context, String title, String message)
	{
		AlertDialog alertDialog = new AlertDialog.Builder(context).create();
		alertDialog.setTitle(title);
    alertDialog.setMessage(message);
    alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog, int which) {
        return;
    } }); 
    alertDialog.show();
	}
	
	public static void DisplayToast(Context context, String message, int length)
	{
		Toast.makeText(context, message,length).show();
	}
	
	public static void sendSMS(String phoneNumber, String message)
	{
		SmsManager.getDefault().sendTextMessage(phoneNumber, null, message, null, null);
	}
}
